/**
 *******************************************************************************
 * @FileName  : board.h
 * @Author    : GaoQiu
 * @CreateDate: 2020-09-10
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */

#ifndef BOARD_H_
#define BOARD_H_

#include "app_config.h"

#ifdef TLSR8258_DK48
	/*! LED Pin define. */
	#define LED_BLUE_PIN       GPIO_PD2
	#define LED_GREEN_PIN      GPIO_PD3
	#define LED_WHITE_PIN      GPIO_PD4
	#define LED_RED_PIN        GPIO_PD5

	/*! LED valid level. */
	#define LED_VALID_LEVEL    1  /*!< 1: high valid; 0: low valid. */

	/*! Keyboard Pin define. */
	#define KB_SCAN0_PIN       GPIO_PB2
	#define KB_SCAN1_PIN       GPIO_PB3

	#define KB_DRV0_PIN        GPIO_PB4
	#define KB_DRV1_PIN        GPIO_PB5

	/*! key map table. */
	#define  KB_DRIV_PINS     {GPIO_PB4, GPIO_PB5}
	#define  KB_SCAN_PINS     {GPIO_PB2, GPIO_PB3}
	#define  KB_MAP_TBL       {\
							    {CR_VOL_UP, BTN_UNPAIR}, \
							    {CR_VOL_DN, BTN_PAIR}, \
							  }
	/*! UART Pin. */
	#define UART_RX_PIN        GPIO_PB0
	#define UART_TX_PIN        GPIO_PB1

#elif defined( TLSR8258_DG48 )
	/*! LED Pin define. */
	#define LED_GREEN_PIN      GPIO_PA2
	#define LED_RED_PIN        GPIO_PA3
	#define LED_YELLOW_PIN     GPIO_PA4
	#define LED_BLUE_PIN       GPIO_PB0
	#define LED_WHITE_PIN      GPIO_PB1

	/*! LED valid level. */
	#define LED_VALID_LEVEL    1  /*!< 1: high valid; 0: low valid. */

	/*! KEY Pin define. */
	#define KEY_SCAN_PIN0      GPIO_PD6 /*!< SW1 */
	#define KEY_SCAN_PIN1      GPIO_PD5 /*!< SW2 */
	#define BTN_PINS           {GPIO_PD6, GPIO_PD5}
	#define BTN_MAPS           {BTN_PAIR, BTN_UNPAIR}

	/*! SWS Pin define. */
	#define SWS_PIN            GPIO_PA7

	/*! UART Pin. */
	#define UART_RX_PIN        GPIO_PB0
	#define UART_TX_PIN        GPIO_PB1
#else
	#error "Please select board..."
#endif

#endif /* BOARD_H_ */
